import { defineStore } from "pinia";


export const useUserStore=defineStore('user',{
    state:()=>({
        name:'李四',
        age:30
    }),
    actions:{
        updateName(newVal){
            this.name=newVal
        }, 
        addAge(){
            this.age++
        }
    }

})